<?php

namespace App\Repositories;

use App\Models\Manager;
use App\Models\File;
class FileRepo
{
    public function exits($original_name)
    {
 
        $file = File::where('original_name',$original_name)->first();

        if($file) {
            return $file->path;
        } 
    }

    public function rsycSave($path,$originalName) 
    {

    	try{
    		$file = new  File;
    		$file->path = $path;
    		$file->original_name = $originalName;
    		$file->save();
    	} catch(\Exception $e) {
    		var_dump($e->getMessage());
    	}
    }
  
}